Starting with a great example of radio button binding here:
http://www.nablasoft.com/alkampfer/index.php/2008/07/29/binding-combobox-to-enum-in-silverlight/
I added a combo box example (which seemed be missing from the example).
Here’s the app with both radios and combo boxes:
Hope it helps!
February 20, 2010 at 12:22 pm |
it all seems verycomplicated just to populate a combobox from the enum, and you have to explicity add each member of the enum to an array anyway. You might just as well create List of all the enum members and then simply binf the combobox.ItemsSource to that list – no need for converters or explicitly defined resources at all. Far less code, far less possibility of erros creeping in.
February 22, 2010 at 4:06 pm |
You read my mind. I’m trending toward using a special coverter which generates the collection on the fly.